package com.kevis.zhunblog.api.vo;

import lombok.Data;

@Data
public class R {
    private int code;

    private String msg;

    private Object data;

    public static R success(Object data) {
        R r = new R();
        r.code = 200;
        r.msg = "成功";
        r.data = data;
        return r;
    }

    public static R error(String msg) {
        R r = new R();
        r.code = 500;
        r.msg = msg;
        return r;
    }
}
